package com.vf.admin.utils.aliyunoss;

import com.aliyun.oss.OSSClient;
import com.aliyun.oss.internal.OSSUtils;
import com.aliyun.oss.model.PolicyConditions;
import org.apache.commons.net.util.Base64;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * <p>Title : </p>
 * <p>Description : </p>
 * <p>DevelopTools : IDEA</p>
 * <p>DevelopSystem : Windows11</p>
 *
 * @Author : zxw
 * @Date 2023/11/20 16:10
 */
public class PostObject {

    // Endpoint以杭州为例，其它Region请按实际情况填写。
    private String endpoint = "https://oss-cn-shenzhen.aliyuncs.com";
    // 阿里云账号AccessKey拥有所有API的访问权限，风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维，请登录RAM控制台创建RAM用户。
    String accessKeyId = "LTAI5tLRaaRm8XhkNZj1kSgq";
    String accessKeySecret = "RBPqGhSkEHMdyDVqelryXezJRQHiWn";
    // 填写Bucket名称。
    private String bucketName = "zhiyuapphn";
    // 填写不包含Bucket名称在内的Object的完整路径。
    private String objectName = "image";

    private void PostObject() throws Exception {


//        //获取getPolicyBase64
//        long expireTime = 600 * 3;
//        long expireEndTime = System.currentTimeMillis() + expireTime * 1000;
//        PolicyConditions policyConditions = new PolicyConditions();
//        policyConditions.addConditionItem(PolicyConditions.COND_CONTENT_LENGTH_RANGE,0,1048576);
//        OSSClient ossClient = new OSSClient();
//


    }


}
